home *** CD-ROM | disk | FTP | other *** search
- Path: news.mountain.net!usenet
- From: Michael Wallace <mjwpop@ovnet.com>
- Newsgroups: comp.lang.c++
- Subject: help with array initialization
- Date: Fri, 08 Mar 1996 12:42:52 -0800
- Organization: MountainNet, Inc. Morgantown WV 800.444.1458
- Message-ID: <31409BCC.2FCD@ovnet.com>
- NNTP-Posting-Host: xtsk2.ovnet.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- I am a student learning c++ and have a question concerning initialization
- of arrays. The textbook I am using (C++, How to program) says that you
- can initialize arrays in this manner - int array[100]={0}; anytime.
- However, trying to compile this with Borland Turbo C++ 4.5 gives an
- error, it only allows that type of initialization if the variable is
- declared static. I have another reference manual (C++, The Complete
- Reference) and as far as I can find, it doesn't say which is correct. If
- someone would please tell me if the textbook or the comipiler is correct?
-
- Bruce Ritchie
-